
import { createPinia } from 'pinia'
import piniaPersist from 'pinia-plugin-persistedstate'

import useUserStore from './modules/user'
import useThemeStore from './modules/theme'
import queryParamsStore from './modules/queryParams'

export const useStore = () => ({
  user: useUserStore(),
  themeStore: useThemeStore(),
  queryParams: queryParamsStore(),
})

const pinia = createPinia()
pinia.use(piniaPersist) //使用持久化插件

export default pinia



